<script type="text/javascript" >
    <?php echo $config['plugin_name']?>.switchButton();
</script>
<div class="w100p bgl">
    <div class="w100p bgr">
        <div class="inner_container">
            <table class="widefat" cellspacing="0">
                <thead>
                    <tr>
                        <?php print_column_headers('stcoreAddOn'); ?>
                    </tr>
                </thead>

                <tbody>
                <?php
                $tr_class = "";
                $i = 0;
                foreach ($config['addOn'] as $addOn) {
                    if( empty($tr_class) || $tr_class == "class='bg_gray2'"){
                        $tr_class = "class='bg_gray1'";
                    }else{
                        $tr_class = "class='bg_gray2'";
                    }
                    if($option['addons'][$addOn['plugin_name']] == 1){
                        $select1 = 'selected';
                        $select2 = '';
                    }else{
                        $select1 = '';
                        $select2 = 'selected';
                    }
                    $i++;
                    echo "<tr $tr_class >"
                    . "<td>" . $i . "</td>"
                    . "<td>" . $addOn['plugin_title'] . "</td>"                    
                    . "<td>" . $addOn['plugin_version'] . "</td>"
                    . "<td>"                    
                    . '<p class="field switch">'                    
                    . "<label name='{$addOn['plugin_name']}' for=\"radio1\" class=\"cb-enable $select1 \"><span>Enable</span></label>"
                    . "<label name='{$addOn['plugin_name']}' for=\"radio2\" class=\"cb-disable $select2 \"><span>Disable</span></label>"
                    . '</p>'
                    . "</td>"
                    . "</tr>"
                    ;
                }
                ?>
                </tbody>
            </table>
        </div>
    </div>
</div>